home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / cc352.zip / COPYCON.DOC next >
Encoding:
Text File  |  1989-11-03  |  21.5 KB  |  576 lines

  1.      
  2.      
  3.      
  4.      
  5.      
  6.      
  7.      
  8.      
  9.      
  10.      
  11.      
  12.      
  13.      
  14.      
  15.      
  16.      
  17.      
  18.      
  19.      
  20.      
  21.      
  22.      
  23.      
  24.      
  25.                                   CopyCon
  26.      
  27.      
  28.                                  Version 3.50
  29.                                September 1989
  30.      
  31.      
  32.      
  33.      
  34.      
  35.      
  36.      
  37.      
  38.      
  39.      
  40.      
  41.      
  42.      
  43.      
  44.      
  45.      
  46.      
  47.      
  48.      
  49.      
  50.      
  51.                                        by
  52.                               John E. Bean, P.E.
  53.                               JB Technology Inc.
  54.                                28701 N. Main St.
  55.                             Ridgefield, Wa. 98642
  56.                                          
  57.  
  58.      
  59.      
  60.      
  61.      
  62.                                  INTRODUCTION
  63.      
  64.      
  65.      CopyCon is a program to be used in lieu of the DOS command COPY CON.  I
  66.      have  used COPY CON numerous times in creating batch files and  miscel-
  67.      laneous small text files. 
  68.      
  69.      I have experienced many frustrating moments using COPY CON.  I have ac-
  70.      cidently  overwritten existing files.  I have mistyped commands only to
  71.      notice  them while entering the next line.  I have also wanted to  have
  72.      graphic boxes in my batch files.
  73.      
  74.      CopyCon  alleviates all of the above problems.  It checks to see if the
  75.      specified  file exists,  and if it does CopyCon provides either loading
  76.      the existing file or allows the existing file to be overwritten.  Copy-
  77.      Con  also has full screen editing capability and built in Macros  which
  78.      aids in creating files.
  79.      
  80.      CopyCon  was written in Turbo Pascal 5.0 using routines from Turbo  5.0
  81.      Professional.
  82.      
  83.      CopyCon  is  so easy to use that this manual is not necessary  but  the
  84.      following sections will briefly discuss how to use CopyCon.
  85.  
  86.      
  87.      
  88.      
  89.                                  LIMITATIONS
  90.      
  91.      I  have designed CopyCon for typical batch files and small text  files.
  92.      It is not designed to be a text editor!  If you need a text editor, Ez-
  93.      Doss (A Dos Shell), which  I have written, includes a text editor. 
  94.      
  95.      There are two main limitations that I designed into this program.  They
  96.      are:
  97.    
  98.                * The  maximum length of a text line is 80  charac-
  99.                  ters.
  100.                * There is no word wrap.
  101.             
  102.      These limitations were done to distinguish the difference between Copy-
  103.      Con and a text editor.   
  104.  
  105.      
  106.      
  107.      
  108.                                GETTING STARTED
  109.      
  110.      CopyCon is comprised of two (2) files. They are:
  111.           * Copycon.exe - The executable program.
  112.           * Copycon.doc - This documentation. 
  113.      
  114.      Start CopyCon by issuing the following command at the DOS prompt:      
  115.             A:>CopyCon (filename).
  116.      
  117.      As  you can see this is identical to using the DOS command COPY CON ex-
  118.      cept there is not a space between Copy and Con. The user is responsible
  119.      for providing a valid filename.
  120.      
  121.      Once  the program is loaded into memory,  the program will check to see
  122.      if your computer has a color graphics card. If it does the program will
  123.      be  displayed in color.  You can force CopyCon to be displayed in black
  124.      and  white by typing in "/bw"  AFTER the filename on the command  line.
  125.      For  example;  if you wish to create a batch file named  "CPY.BAT"  and
  126.      have CopyCon be in black and white the following is the correct syntax.
  127.      
  128.                               A:>CopyCon  CPY.BAT /bw
  129.      
  130.      Next  the screen will be cleared,  ">CopyCon  (filename)"  will be dis-
  131.      played in the upper left hand corner.  Several other items will be dis-
  132.      played to the right of the file name. They are:
  133.           * F1 - Help:     A  help menu is available simply by  de   
  134.                            pressing the F1 function key.  The help    
  135.                            menu  provides  information on  editing
  136.                            keys and several batch file command.
  137.           * F2 - Macros:   Depressing  the  F2 function  key  will
  138.                            display the predefined Macros.
  139.           * 1,1:           The  y,x position of the cursor.  The y
  140.                            position is the FILE LINE position.
  141.           * INS:           If  the insert mode is ON then INS will    
  142.                            be displayed. 
  143.           * [max line]:    The  number displayed inside the "[  ]"
  144.                            is  the  maximum number of  lines  your
  145.                            file can have. For a 640K machine, this     
  146.                            should be around 5000.
  147.      
  148.      If the file entered on the command line exists,  a pop up menu will ap-
  149.      pear offering the following choices:
  150.           * LOAD:        This  option will load the existing  file    
  151.                          and  CopyCon  can be used to  modify  the    
  152.                          file.
  153.           * OVERWRITE:   This  option will overwrite the  existing    
  154.                          file. 
  155.           * EXIT:        This option will abort CopyCon.
  156.      
  157.      The cursor will be located at the left hand column  of your screen. You
  158.      are now ready to create/edit your file.
  159.      
  160.  
  161.      
  162.      
  163.                               EDITING COMMANDS
  164.      
  165.      CopyCon  provides simple editing commands.  These commands can be  dis-
  166.      played  while  editing through the Help Menu which is accessed  by  de-
  167.      pressing  the F1 function key.  The editing commands can be broken into
  168.      the following sections.
  169.      
  170.      CURSOR PAD KEYS:
  171.        Up Arrow Key:
  172.           Depressing  the Up arrow key will move the cursor to the
  173.           previous line. Depressing the Up arrow key while on line
  174.           one will result in the display of an error message.
  175.      
  176.        Down Arrow Key:
  177.           Depressing  the  Down arrow key will move the cursor  to
  178.           the  next line.  Depressing the Down arrow key while  on
  179.           the  last line entered will result in the display of  an
  180.           error message.
  181.      
  182.        Left Arrow Key:
  183.           Depressing  the Left arrow key will move the cursor  one
  184.           position  left on the current line.  Depressing the Left
  185.           arrow  key  while at the leftmost column on  the  screen
  186.           will result in the display of an error message.
  187.      
  188.        Right Arrow Key:
  189.           Depressing  the Right arrow key will move the cursor one
  190.           position right on the current line. Depressing the Right
  191.           arrow  key  while at the rightmost column on the  screen
  192.           will result in the display of an error message.
  193.      
  194.        Home Key:
  195.           Depressing  the  HOME  key will move the cursor  to  the
  196.           leftmost position on the current line.
  197.      
  198.        End Key:
  199.           Depressing  the  END  key will move the  cursor  to  the
  200.           rightmost position on the current line.
  201.      
  202.        Tab Key:
  203.           Depressing  the TAB key will move the cursor right eight
  204.           (8) spaces.
  205.      
  206.        Shift Tab Key:
  207.           Simultaneously  depressing the Shift key and the Tab key
  208.           will move the cursor left eight (8) spaces.
  209.  
  210.      
  211.        Ctrl Home Key:
  212.           Simultaneously  depressing the Ctrl key and the HOME key
  213.           will move the cursor to the top of the screen.
  214.      
  215.        Ctrl End Key:
  216.           Simultaneously  depressing the Ctrl key and the END  key
  217.           will move the cursor to the bottom of the screen.
  218.      
  219.        Ctrl PgDn Key:
  220.           Simultaneously  depressing the Ctrl key and the PgDn key
  221.           will move the cursor to the end of the file. If the cur-
  222.           sor  is already at the end of the file an error  message
  223.           will be displayed.
  224.      
  225.        Ctrl PgUp Key:
  226.           Simultaneously  depressing the Ctrl key and the PgUp key
  227.           will move the cursor to the top of the file. If the cur-
  228.           sor  is already at the top of the file an error  message
  229.           will be displayed.
  230.      
  231.        Ins Key:
  232.           Depressing  the  INS key will toggle the Insert Mode  on
  233.           and off.  If the Insert Mode is on,  "INS"  will be dis-
  234.           played on the top line in inverse video.
  235.      
  236.        Del Key:
  237.           Depressing  the DEL key will delete the character  under
  238.           the  current  cursor position.   All characters  to  the
  239.           right  will move one space to the  left.
  240.      
  241.      
  242.      FUNCTION KEYS:
  243.      
  244.        F1:
  245.           Depressing  the  F1 function key will display  the  Help
  246.           Menu.  The  Help  Menu will display screens for all  the
  247.           keys  discussed in this section and the following  Batch
  248.           File commands:
  249.                               * Echo
  250.                               * Set
  251.                               * Rem
  252.                               * Pause
  253.                               * Shift
  254.                               * Goto
  255.                               * If
  256.                               * For
  257.  
  258.      
  259.        F2:
  260.           Depressing the F2 function key will display a listing of
  261.           all the built in Macros available in this program.
  262.      
  263.        F3:
  264.           Depressing  the  F3 function key will copy the  previous
  265.           line. (The tutorial will show how useful this can be)
  266.      
  267.        F4:
  268.           Depressing  the F4 function key will center the  current
  269.           line on the screen.  This feature is multifunctioned. If
  270.           the line starts with "REM"  or "ECHO" the centering will
  271.           be offset to accommodate for those words.  (The tutorial
  272.           will show how this works)
  273.      
  274.        F6:
  275.           Depressing  the  F6 function key will save the file  and
  276.           exit the program.
  277.      
  278.        F7:
  279.           Depressing the F7 function key will insert a new line at
  280.           the current cursor position.
  281.      
  282.        F8:
  283.           Depressing  the F8 function key will delete the  current
  284.           line.
  285.      
  286.      OTHER KEYS:
  287.      
  288.        TAB:
  289.           Depress the TAB key will move the cursor eight (8) posi-
  290.           tions to the right. 
  291.      
  292.        SHIFT TAB:
  293.           Simultaneously  depressing the SHIFT key and the TAB key
  294.           will move the cursor eight (8) positions to the left.
  295.      
  296.        ESC:
  297.           Depressing the ESC key will abort CopyCon.  Once the ESC
  298.           key has been depressed, CopyCon will ask if you are sure
  299.           you  wish to leave CopyCon.  If you do,  depress the "Y"
  300.           key and if you do not simply depress any other key.
  301.  
  302.           
  303.        ALT -:
  304.           Simultaneously depressing the ALT key and the MINUS key,
  305.           located next to the 0 key,  will allow multiple lines of
  306.           text  to  be marked as a block which can be inserted  at
  307.           another location in the file. 
  308.           
  309.           Once the ALT MINUS key combination has been depressed, a
  310.           "pop up"  window will be displayed asking how many lines
  311.           will  be included in the block.  Enter the proper number
  312.           (0  if  you do not want any) and  depress  <Enter>.  The
  313.           lines  of text in the block will be displayed in a  dif-
  314.           ferent color.
  315.           
  316.        ALT +:
  317.           Simultaneously  depressing the ALT key and the PLUS key,
  318.           located next to the BACKSPACE key,  will insert the pre-
  319.           viously marked block in the current line.
  320.           
  321.        ALT Z:
  322.           Simultaneously  depressing the ALT key and the letter  Z
  323.           will flush (unmark) the block.
  324.  
  325.      
  326.      
  327.      
  328.                                      MACROS
  329.      
  330.      CopyCon has built in Macros.  What are Macros?  Macros are a  character
  331.      or a series of characters displayed on the screen when a designated key
  332.      or  two designated keys are simultaneously depressed.  A list of Macros
  333.      can be displayed during editing by depressing the F2 function key.  The
  334.      Macros in CopyCon can be divided into two categories. They are:
  335.      
  336.      BATCH FILE COMMANDS:
  337.      
  338.      CopyCon  has assigned several of the most commonly used batch file com-
  339.      mands to key combinations. They are:
  340.      
  341.        Alt C:
  342.           Simultaneously depressing the Alt   key and the "C"  key
  343.           will display "copy " on the screen.
  344.      
  345.        Alt E:
  346.           Simultaneously depressing the Alt   key and the "E"  key
  347.           will display   "echo " on the screen.
  348.      
  349.        Alt F:
  350.           Simultaneously  depressing the Alt key and the  "F"  key
  351.           will display "for %% in ( ) do " on the screen.
  352.      
  353.        Alt G:
  354.           Simultaneously  depressing the Alt key and the  "G"  key
  355.           will display "goto " on the screen.
  356.      
  357.        Alt I:
  358.           Simultaneously  depressing the Alt key and the  "I"  key
  359.           will display "shift  " on the screen.
  360.      
  361.        Alt L:
  362.           Simultaneously depressing the Alt   key and the "L"  key
  363.           will display   "cls " on the screen.
  364.      
  365.        Alt P:
  366.           Simultaneously  depressing the Alt key and the  "P"  key
  367.           will display "path " on the screen.
  368.      
  369.        Alt R:
  370.           Simultaneously depressing the Alt   key and the "R"  key
  371.           will display   "rem" on the screen.
  372.      
  373.        Alt S:
  374.           Simultaneously depressing the Alt   key and the "S"  key
  375.           will display   "erase" on the screen.
  376.  
  377.      
  378.      
  379.                                GRAPHIC BOXES: 
  380.      
  381.      Many times boxes look good in batch files. CopyCon has established Mac-
  382.      ros for both single and double sided boxes. The following will describe
  383.      the keys used to print the box characters on the screen.
  384.      
  385.      SINGLE LINED BOX:
  386.      
  387.        Alt F1 - Upper Left Hand Corner
  388.        Alt F2 - Upper Right Hand Corner
  389.        Alt F3 - Lower Left Hand Corner
  390.        Alt F4 - Lower Right Hand Corner
  391.        Alt F5 - Horizontal Line
  392.        Alt F6 - Vertical Line
  393.        Alt F7 - Upper Horizontal Cross
  394.        Alt F8 - Lower Horizontal Cross
  395.        Alt F9 - Left Vertical Cross
  396.        Alt F10- Right Vertical Cross
  397.        Alt 6  - Center Cross
  398.      
  399.      
  400.      DOUBLE LINED BOX:
  401.      
  402.        Ctrl F1 - Upper Left Hand Corner
  403.        Ctrl F2 - Upper Right Hand Corner
  404.        Ctrl F3 - Lower Left Hand Corner
  405.        Ctrl F4 - Lower Right Hand Corner
  406.        Ctrl F5 - Horizontal Line
  407.        Ctrl F6 - Vertical Line
  408.        Ctrl F7 - Upper Horizontal Cross
  409.        Ctrl F8 - Lower Horizontal Cross
  410.        Ctrl F9 - Left Vertical Cross
  411.        Ctrl F10- Right Vertical Cross
  412.        Alt 5   - Center Cross
  413.      
  414.    
  415.      SHADING: 
  416.      
  417.      There  are  several  characters that are commonly  used  for  "shading"
  418.      boxes.  CopyCon  provides Macros for four (4) of these characters.  De-
  419.      pressing Alt 1,  Alt2, Alt 3 or Alt 4 will insert a "shading" character
  420.      on the screen.
  421.      
  422.      
  423.  
  424.      
  425.      
  426.                                VERSION CHANGES
  427.      
  428.      Version 3.52 has changed the following:
  429.           * Fixed bug when you exit when nothing was entered in a
  430.             new file.
  431.      
  432.      Version 3.50 has changed the following:
  433.           * Fixed  bugs with the delete line function.  Sometimes
  434.             the last line would be lost when saved.
  435.           * Added "BLOCK"  functions. I got so many requests that
  436.             I added some minor block functions.  You can now mark
  437.             several  lines  of text,  insert text and  flush  the
  438.             buffer.  You  have to enter the number of lines  that
  439.             you want in your block. I feel that is reasonable be-
  440.             cause this program is designed for small files and by
  441.             doing  this way,  there was minimun code to be added,
  442.             thus keeping the program as small as possible.
  443.      
  444.      Version 3.25 has changed the following:
  445.           * Backup files are now ceated with an extension of .BAK.
  446.           * Miscellaneous bugs are fixed.
  447.    
  448.      Version 3.10 has changed the following:
  449.           * Fixed a bug in scolling up multiple screen files.
  450.           * Added color to the program. 
  451.           * Change the X,Y on the status line to be Y,X.
  452.           
  453.      Version 3.0 has changed the following:
  454.           * Converted to Turbo Pascal 5.0.
  455.           * The  maximum length of the file is limited only to the
  456.             size of RAM.
  457.           * Many of the bugs in 2.0 have been corrected.
  458.    
  459.      Version 2.0 has changed the following:
  460.           * The program was rewritten in Turbo Pascal 4.0.
  461.           * A  Help  Menu has been include providing help on  some
  462.             most commonly used batch file commands.
  463.      
  464.      Version 1.30 has changed the following:
  465.           * When copying (F3) the line above,  the cursor now goes  
  466.             next line.
  467.           * Corrected  an  error when attempting to center (F4)  a  
  468.             blank line. 
  469.           * Added  cursor X and cursor Y (file line) to the status  
  470.             line.
  471.           * Added Insert Line (Ctrl N).
  472.           * Added Delete Current Line (Ctrl Y)
  473.      
  474.      Version 1.20 has changed the following:
  475.           * Better memory allocation. 
  476.           * Limit file size to 500 lines maximum
  477.           * CopyCon will now load existing files.
  478.      
  479.  
  480.      
  481.      
  482.                                OTHER PROGRAMS
  483.      
  484.      I  have  used many Public Domain,   Shareware  and  Commercial software
  485.      over the years.  In appreciation to all those authors of  Public Domain
  486.      Programs I have written several Public Domain Programs. They are:
  487.      
  488.      EzDoss: ($10.00)
  489.        EzDoss   is  a  Dos Shell.  I have  used  many  Dos shells  over
  490.        the past years.  Each program has several features that I really
  491.        enjoy.   I  decided  to write a Dos Shell that put most of those
  492.        features  into  EzDoss.   EzDoss  is both Menu Driven  and   has
  493.        "Quick  Keys".  Some of the features that  EzDoss has are:
  494.           * Tag files either singularly,  all at once,  or by pat-
  495.             tern.
  496.           * Copy,   delete,  move, rename,   print or  view tagged
  497.             or highlighted files.
  498.           * Include  or  Exclude file from being  displayed  by  a
  499.             user defined mask.
  500.           * Edit an existing Ascii file.
  501.           * Invoke an Ascii text SideKick type editor.
  502.           * Locate  all files using a user  defined  mask for on a
  503.             given drive.
  504.           * Print a tree of the specified disk drive.
  505.           * Format a disk without leaving EzDoss.
  506.      
  507.        I  am  sure that once you try EzDoss and discover all the  power
  508.        and ease it has this will  become an indispensable program.
  509.      
  510.      
  511.      Find Duplicates: ($15.00)
  512.        Most  users of hard disks have duplicates files on their  disks.
  513.        The  file  COMMAND.COM will appear in  numerous  subdirectories.
  514.        Significant hard disk space is being wasted by these files.
  515.      
  516.        Find  Duplicates  is an utility which scans the  specified  hard
  517.        disk drive and displays a list of duplicate files.  You can move
  518.        through  the list by using the arrow keys,  page down,  page up,
  519.        home or end keys.  The contents of the files can be viewed using
  520.        LIST.COM.  Files which you want to be deleted,  are "tagged"  by
  521.        depress  the "T"  key.  Once all the desired files are "tagged",
  522.        depressing  the  F10 function key will delete all  the  "tagged"
  523.        files.
  524.      
  525.        Find  Duplicates  will become an utility that will be used on  a
  526.        regular basis.
  527.  
  528.      
  529.      Back Off!: ($15.00)
  530.        Back Off!  is an utility that you will used on a weekly basis. A
  531.        co-worker of mine one day told me that I need to write a program
  532.        that  will  display  backup  files on the screen  which  can  be
  533.        "tagged" and deleted. 
  534.        
  535.        Back  Off!  does just that.  Back Off!  allows up to thirty (30)
  536.        different  file extensions and will scan multiple  drives.  Once
  537.        the  drives  have  been scanned for files  with  the  extensions
  538.        listed, the files will be displayed on the screen. The files can
  539.        be viewed (only in ASCII format) and/or "tagged" for deletion.
  540.        
  541.        The registered version adds the features of having multiple data
  542.        files which contains the files extensions to be searched for and
  543.        the option of having Back Off! perform in automatic mode. In au-
  544.        tomatic mode,  Back Off!  will scan the disk drives specified on
  545.        the  command  line  and for the files with the  same  extensions
  546.        found in the specified file. Those matching files will automati-
  547.        cally be deleted.  This feature is designed so Back Off!  can be
  548.        used in batch files. An example is:
  549.        
  550.                       BO /d=c,d /f=baks /auto
  551.        
  552.        The  above  example will scan drives C and D,  search for  files
  553.        whose extension match those in the data file "BAKS.EXT"  and au-
  554.        tomatically deletes the matching files.
  555.        
  556.        Back Off! will be an utility that you will use weekly.
  557.        
  558.      
  559.      
  560.      To  get the most current version and printed manuals of the above  pro-
  561.      grams send amount listed next to the program to me at the following ad-
  562.      dress:
  563.      
  564.                                    John E. Bean
  565.                                 JB Technology Inc.
  566.                                 28701 N. Main St.
  567.                               Ridgefield, Wa. 98642
  568.                                   (206) 887-3442
  569.      
  570.      I  hope you enjoyed CopyCon and please do not hesitate to send comments
  571.      and praise to me.
  572.      
  573.      
  574.  
  575.      
  576.